/**
 * 项目信息表 api 封装
 *
 * @Author:    yurui
 * @Date:      2024-07-01 16:39:11
 * @Copyright  shjz
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const projectApi = {

  /**
   * 分页查询  @author  yurui
   */
  queryPage: (param) => {
    return postRequest('/project/queryPage', param);
  },

  /**
   * 增加  @author  yurui
   */
  add: (param) => {
    return postRequest('/project/add', param);
  },

  /**
   * 修改  @author  yurui
   */
  update: (param) => {
    return postRequest('/project/update', param);
  },


  /**
   * 删除  @author  yurui
   */
  delete: (id) => {
    return getRequest(`/project/delete/${id}`);
  },

  /**
   * 批量删除  @author  yurui
   */
  batchDelete: (idList) => {
    return postRequest('/project/batchDelete', idList);
  },
  // 柱状图
  histogram: (projectId) => {
    return getRequest('/usageOutbound/queryBy/' + projectId + '')
  },
  laborCost: (projectId) => {
    return getRequest(`/project/laborCost/${projectId}`)
  },
  //添加报价合同 /projectAttachment/batchAdd

  batchAddhet: (param) => {
    return postRequest(`/projectAttachment/add`, param)
  },
  //合同查询 /projectAttachment/queryPage
  batchqueryPagehet: (param) => {
    return postRequest(`/projectAttachment/queryPage`, param)
  },
  ///projectAttachment/delete/{id}

  batchdelhet: (id) => {
    return getRequest(`/projectAttachment/delete/`+id,)
  },
  batchupdatehet: (param) => {
    return postRequest(`/projectAttachment/update/`,param)
  },
  // //projectAttachment/update
 
};
